FROM docker

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

COPY ssh/* /root/.ssh/
COPY runner.conf /root/vpn/runner.conf
COPY wait_vpn.sh /root/wait_vpn.sh
RUN chmod 400 /root/.ssh/id_rsa

RUN apk update && apk upgrade && \
    apk add --no-cache openssh \
        wget \
        git \
        vim \
        openvpn \
        bash \
        curl
RUN apk add -u --no-cache tzdata \
 && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
RUN git config --global user.email "cicd@axiaodiao.com" && git config --global user.name "CI/CD"

ENV TZ Asia/Shanghai
